﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TB_CS.Rate
{
    public partial class Rate_Insert : Form
    {
        public Rate_Insert()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if(textBox1.Text=="")
            {
                MessageBox.Show("请输入淘宝ID，这个是必备的", "警告");
                textBox1.Focus();
            }
            else if (textBox3.Text == ""||textBox3.Text.Length<10)
            {
                MessageBox.Show("请详细的描述订单状况", "警告");
                textBox3.Focus();
            }
            else if (comboBox1.Text=="")
            {
                MessageBox.Show("请选择类型", "警告");
            }
            else
            {
                Class.SysInfo.WSRATE.INSERT_RATE(Convert.ToInt32(Class.SysInfo.INFO_Seller_ID.ToString()),
                    textBox1.Text.Trim().ToString(), textBox2.Text.Trim().ToString(), comboBox1.Text.Trim().ToString(),
                    "---"+textBox3.Text.Trim().ToString()+"【"+Class.SysInfo.GET_Seller_Nick().ToString()+"-"+Class.SysInfo.Get_UserName().ToString()+"贡献】");
                MessageBox.Show("添加成功，请继续", "Success");
                textBox1.Text = "";
                textBox2.Text = "";
                textBox3.Text = "";
                textBox1.Focus();
            }
        }
    }
}
